Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consumer(ticdc): do not sort to detect out of order events #11934

Merged
merged 13 commits into from
Dec 31, 2024

Conversation

3AceShowHand
Copy link
Contributor

@3AceShowHand 3AceShowHand commented Dec 25, 2024

What problem does this PR solve?

Issue Number: close #11947

What is changed and how it works?

  • do not sort events when resolve events by the resolve ts

Check List

Tests

  • Unit test
  • Integration test

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

`None`

@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 25, 2024
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 26, 2024
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 26, 2024
@3AceShowHand
Copy link
Contributor Author

/retest

1 similar comment
@3AceShowHand
Copy link
Contributor Author

/retest

@3AceShowHand
Copy link
Contributor Author

/retest

@3AceShowHand 3AceShowHand changed the title [DNM] consumer(ticdc): do not sort events consumer(ticdc): do not sort event before flush Dec 30, 2024
@3AceShowHand 3AceShowHand changed the title consumer(ticdc): do not sort event before flush consumer(ticdc): do not sort to detect out of order events Dec 30, 2024
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Dec 30, 2024
@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 30, 2024
@3AceShowHand
Copy link
Contributor Author

/retest

@@ -379,31 +386,24 @@ func (w *writer) WriteMessage(ctx context.Context, message *kafka.Message) bool
w.checkPartition(row, partition, message.TopicPartition.Offset)

tableID := row.GetTableID()
if w.option.protocol != config.ProtocolSimple {
switch w.option.protocol {
case config.ProtocolSimple, config.ProtocolCanalJSON:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why exclude open protocol?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and Canal-JSON, the table id is already encoded into the message.

Open-Protocol, table id is only set for the partition table, so we have to generate fake table id for all open protocol encoded messages.

Copy link
Contributor

ti-chi-bot bot commented Dec 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: asddongmen, wk989898

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [asddongmen,wk989898]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 30, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 30, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-30 07:49:41.76389785 +0000 UTC m=+336717.119902390: ☑️ agreed by asddongmen.
  • 2024-12-30 08:48:19.639741062 +0000 UTC m=+340234.995745602: ☑️ agreed by wk989898.

@3AceShowHand
Copy link
Contributor Author

/retest

@ti-chi-bot ti-chi-bot bot merged commit 685ebd6 into pingcap:master Dec 31, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kafka consumer should not sort events
3 participants